package ink.lovejinhu.leetcode;

/**
 * @author jinhu
 * created 2021-07-14 10:29
 */
public class Solution_0389 {
    public char findTheDifference(String s, String t) {
        char[] chars0 = s.toCharArray();
        char[] chars1 = t.toCharArray();
        int res = chars1[0];
        for (int i = 0, j = 1; i < chars0.length && j < chars1.length; i++,j++) {
            res = res ^ chars0[i] ^ chars1[j];
        }
        return (char) res;
    }
}
